package com.imau.common;

import javax.servlet.*;
import java.io.IOException;

/**
 * 对Servlet实现，方便自定义Servlet继承
 * 原生的Servlet接口方法，不是所有都需要实现。
 */
public class GeneriServlet implements Servlet {
    private ServletConfig servletConfig;
    public void init(ServletConfig servletConfig) throws ServletException {
        this.servletConfig = servletConfig;
    }

    public ServletConfig getServletConfig() {
        return this.servletConfig;
    }

    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {

    }

    public String getServletInfo() {
        return servletConfig.getServletName();
    }

    public void destroy() {

    }
}
